FROM --platform=$TARGETPLATFORM alpine:3.12.4 AS builder
COPY ./start/start.sh /
RUN mkdir /usr/node &&chmod 0755 /start.sh
WORKDIR /usr/node
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&&apk update && apk --no-cache add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata \
&& cd /usr/node \
&& apk --no-cache add git libstdc++ \
&& git clone -b master https://gitee.com/watermelon_peel/ttnode-service.git /usr/node \
&& git remote set-url origin https://gitee.com/watermelon_peel/ttnode-service.git \
&& chmod -Rf 0755 /usr/node \
&& sh /usr/node/arch.sh \
&& echo "修改15" \
&& rm -rf /var/cache/apk/* 

CMD ["/start.sh"]
